var rootUrl = '/ws/';
$(document).ready(function() {
	$.post(rootUrl+"index.php?g=mobile&m=login&a=isLogin","",function(res){
		wx.config({
		    debug: false, 
		    appId: res.jsdk.appId,
			timestamp: res.jsdk.timestamp,
			nonceStr: res.jsdk.nonceStr,
			signature: res.jsdk.signature,
		    jsApiList: [
		      // 所有要调用的 API 都要加到这个列表中
		      'onMenuShareTimeline',
		      'onMenuShareAppMessage'
		    ]
		});
	},"json");
	
	
	var mymuis = document.getElementById('musicfx');
	var isPlay = true;
//	function play_music() {
//		
//	}
	$(".stop").on("click", function() {
		if (isPlay == true) {
			mymuis.pause();
			$(this).removeClass('muls');
			isPlay = false;
		} else {
			mymuis.play();
			$(this).addClass('muls');
			isPlay = true;
		}
	});
	
})
wx.ready(function () {
		wx.onMenuShareTimeline({
		    title: 'G4媒体融合实验室精心策划',
		     link:'http://g4.airefp.com/ws/Html/Highsun/index.html',
		     imgUrl: 'http://g4.airefp.com/ws/Html/Highsun/img/share.png',
		      trigger: function (res) {
		       
		      },
		      success: function (res) {
		    	 
		      },
		      cancel: function (res) {
		       
		      },
		      fail: function (res) {
		      }
	    });
	    
		wx.onMenuShareAppMessage({
		    title: '海印全媒体推广方案',
		    desc: 'G4媒体融合实验室精心策划',
		    link:'http://g4.airefp.com/ws/Html/Highsun/index.html',
		    imgUrl: 'http://g4.airefp.com/ws/Html/Highsun/img/share.png',
		    success: function () { 
		    	
		    },
		    cancel: function () { 
		        // 用户取消分享后执行的回调函数
		    }
		});

	});
var myswiper = new Swiper('.swiper-container', {
	direction: 'vertical',
	mousewheelControl: false,
	onInit: function(swiper) {
		swiperAnimateCache(swiper);
		swiperAnimate(swiper);
	},
	onSlideChangeEnd: function(swiper) {
		swiperAnimate(swiper);
	}
})